﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
namespace winForm
{
	public partial class Form1 : Form
	{
		public Form1()
		{
			InitializeComponent();
		}

		private void Form1_Load(object sender, EventArgs e)
		{
			
		}
		public float Plus(float startNum, float endNum)
		{
			float result = 1;
			for (int i = 0; i < endNum - startNum; i++)
			{
				result *= (startNum + 1f);
			}
			return result;
		}

		private void button1_Click(object sender, EventArgs e)
		{
			int start = Convert.ToInt32(textBox1.Text.ToString());
			int end = Convert.ToInt32(textBox2.Text.ToString());
			Stopwatch sw = new Stopwatch();
			sw.Start();
			float result = Plus(start, end);
			sw.Stop();
			label1.Text = sw.ElapsedMilliseconds.ToString();
			label2.Text = result.ToString();
		}
	}
}
